<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

// Route::get('/', function () {
//     return view('welcome');
// });

	Route::get('/home','Home\HomeController@index');
	Route::get('/','Home\HomeController@index');

	//后台验证码	
	Route::get('/vcode','Admin\LoginController@vcode'); 
	//后台登录页面
	// Route::controller('/admin/login',"Admin\LoginController");
	

// Route::group(['middleware'=>'adminlogin'],function(){
	//后台
	Route::get('/admin','Admin\AdminController@index');
	// Route::controller('/admin','Admin\AdminController');
	//用户管理
	Route::controller('/admin/user','Admin\UserController');
	//后台价格管理
	Route::controller('/admin/price','Admin\PriceController');
	//后台药材商品管理
	Route::controller('/admin/medicinal','Admin\MedicinalController');
	//后台门户板块管理
	Route::controller('/admin/portaltype','Admin\PortaltypeController');
	//后门户内容管理
	Route::controller('/admin/portalpost','Admin\PortalpostController');
	//网站配置管理
	Route::controller('/admin/config','Admin\ConfigController');
	//后台友情链接管理
	Route::controller('/admin/friend','Admin\FriendController');
	//后台药材品种管理
	Route::controller('/admin/varieties','Admin\VarietiesController');
	//后台门户药材详情管理
	Route::controller('/admin/book','Admin\BookController');
	//后台登录页面
	//Route::controller('/admin/login',"Admin\LoginController");
	//后台帖子模块管理
	Route::controller('/admin/posttype',"Admin\PostController");
	//后台论坛帖子管理
	Route::controller('/admin/bbspost','Admin\BbspostController');
	//后台药材模块管理
	Route::controller('/admin/mtype',"Admin\MtypeController");
	//退出
	Route::controller('/admin/clear','Admin\ClearController');
	//后台登录页面
	Route::controller('/admin/login',"Admin\LoginController");
// });
	//后台登录页面
	Route::controller('/admin/login',"Admin\LoginController");

	//前天登录ajax判断=====================================
	Route::get('/send','Home\RegisterController@sendmess');
	//前台登录页面
	Route::controller('/home/login',"Home\LoginController");
	//前台验证码
	Route::get('/home/vcode','Home\LoginController@vcode'); 

Route::group(['middleware' => 'login'],function(){
	//门户
	Route::get('/','Home\HomeController@index');
	//门户
	Route::get('/home','Home\HomeController@index');
	// Route::post('/home','Home\HomeController@search');
	Route::controller('/home/home','Home\HomeController');
	//门户板块详情
	Route::controller('/home/portaltype','Home\PortaltypeController');
	//门户新闻详情
	Route::controller('/home/portalpost','Home\PortalpostController');
	//门户价格
	Route::controller('/home/price','Home\PriceController');
	//论坛首页
	Route::controller('/home/bbs','Home\BbsController');
	//门户品种
	Route::controller('/home/varieties','Home\VarietiesController');
	//前台注册页面
	Route::controller('/home/register',"Home\RegisterController");
	//退出
	Route::controller('/home/clear','Home\ClearController');
	//前台帖子模块页面
	Route::controller('/home/post',"Home\PostController");
	//前台用户中心
	Route::controller('/home/user',"Home\UserController");
});
